home *** CD-ROM | disk | FTP | other *** search
- property pPlaceToGo, pTimeLeaving, pReadyToGo, pInitialized
- global gChosenCar, gHaveSound
-
- on beginSprite me
- stopSounds()
- initializeGlobals()
- pInitialized = 0
- preloadModels()
- pTimeLeaving = 0
- end
-
- on beginMusic me
- if gHaveSound then
- if not sound(1).isBusy() then
- sound(1).play(member("cracermusic"))
- sound(1).volume = 120
- end if
- end if
- end
-
- on exitFrame me
- if not pInitialized then
- chooseRenderer(#NonDTS)
- pInitialized = 1
- beginMusic()
- end if
- if the shiftDown then
- sendAllSprites(#keyWasPressed, #Shift, "Shift")
- else
- if the controlDown then
- sendAllSprites(#keyWasPressed, #Control, "Control")
- else
- if the optionDown then
- sendAllSprites(#keyWasPressed, #ALT, "Alt")
- end if
- end if
- end if
- exitKeysPressed()
- if (the milliSeconds > pTimeLeaving) and (pTimeLeaving > 0) then
- if pReadyToGo then
- go(pPlaceToGo)
- else
- pReadyToGo = 1
- go(the frame)
- end if
- else
- go(the frame)
- end if
- end
-
- on choseCar me, whichCar
- gChosenCar = whichCar
- setupRacers(whichCar)
- me.LeaveFrame("Tweak Car")
- end
-
- on keyDown me
- put the key && the keyCode
- sendAllSprites(#keyWasPressed, the keyCode, the key)
- end
-
- on LeaveFrame me, whichFrame
- timeToLeave = 1500
- sendAllSprites(#LeaveThisFrame, timeToLeave)
- pPlaceToGo = whichFrame
- pTimeLeaving = the milliSeconds + timeToLeave
- end
-